<?php





?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>php redis demo</title>
<script type="text/javascript" src="js/ajax141212.js"></script>
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<link rel="stylesheet" href="css/default.css" />
</head>
<body>
<?php $this->load->view("layout/topinfo");?>
<br>
<table align="center" width="1000" border="1" style="margin-top:10px;">
  <tr bgcolor="#CCCCCC">
    <td>KEY</td>
    <td>值</td>
    <td>LIFE</td>
    <td>TYPE</td>
    <td>操作</td>
  </tr>
<?php

if($redis->exists($key)){

?>
  <tr>
    <td><?php echo $key?></td>
    <td><?php echo substr($redis->get($key), 0, 80)?></td>
    <td><?php echo $redis->ttl($key)?></td>
    <td><?php echo $redis->type($key)?></td>
    <td>
    <input type="button" value="查看" onclick="jsonview('<?php echo $key?>')"/> 
    <input type="button" value="删除" onclick="del('<?php echo $key?>')"/>
    </td>
  </tr>
<?php

}
?>
</table>
<br>
<script language="javascript">

function jsonview(key, i) {
	window.open('/view/json.html?key='+key); 
}

</script>
</body>
</html>

